import { Controller } from '@nestjs/common';
import { Crud, CrudController, Override, ParsedRequest, ParsedBody, CrudRequest } from '@nestjsx/crud';
import { ApiTags} from '@nestjs/swagger';
import { CouponGoods } from '../../entities/coupon_goods.entity';
import { CouponGoodsService } from '../../services/coupon-goods/coupon-goods.service';


@Crud({
  model:{
    type:CouponGoods,
  },
  query:{
    join:{
      coupon:{
        //allow:["id"],
        exclude:["send_type"],
        eager:true
      }
    },
    exclude:["goods_id","coupon_id"]
  }
})
@ApiTags('coupon-goods')
@Controller('api/coupon-goods')
export class CouponGoodsController {
  constructor(
    public service:CouponGoodsService
  ){}
}
